package com.pro.common.service.user.model.base;

import com.pro.common.api.CommonConst;
import com.pro.common.api.model.BaseModel;
import com.pro.common.api.model.auth.IOpenConfigClass;
import com.pro.framework.api.enums.IEnumToDbDbId;
import com.pro.framework.javatodb.annotation.JTDField;
import com.pro.framework.javatodb.annotation.JTDTable;
import com.pro.framework.javatodb.constant.JTDConst;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 用户等级
 *
 * @author admin
 */
@Data

@EqualsAndHashCode(callSuper = true)
@Schema(description="用户等级配置")
// 只需要生成 UserLevel 具体业务表
@JTDTable(sequences = {
        "UNIQUE KEY `uk_level` (`level`)",
}, module = CommonConst.Modules.user, entityId = 20004)
public class BaseUserLevelConfig extends BaseModel implements IOpenConfigClass, IEnumToDbDbId {
    @Schema(description = "图片图标")
    @JTDField(notNull = JTDConst.EnumFieldNullType.can_null, uiType = JTDConst.EnumFieldUiType.image)
    private String icon;
    @Schema(description = "字体图标")
    @JTDField(group = "基础信息")
    private String iconFront;
    @Schema(description = "等级名称")
    @JTDField(group = "基础信息")
    private String levelName;
    @Schema(description = "等级顺序值")
    @JTDField(group = "基础信息")
    private Integer level;
    @Schema(description = "描述文章")
    @JTDField(group = "基础信息")
    private String description;
    @Schema(description = "有效天数")
    @JTDField(group = "基础信息")
    private Integer validDays;
    @Schema(description = "排序")
    @JTDField(group = "基础信息")
    private Integer sort;
    @Schema(description = "启用")
    @JTDField(group = "基础信息")
    private Boolean enabled;
    @Schema(description = "享受推广佣金")
    @JTDField(group = "基础信息")
    private Boolean isEnjoyTgCommission;
    @Schema(description = "显示")
    @JTDField(group = "基础信息")
    private Boolean isOpen;
    @Schema(description = "备注")
    @JTDField(group = "基础信息")
    private String remark;
    @Schema(description = "佣金等级限制开关")
    @JTDField(group = "佣金信息")
    private Boolean commissionLevelLimitOpen;
    @Schema(description = "充值推广佣金百分比")
    @JTDField(group = "佣金信息",description = "可逗号分隔多级分润_例如配置三个数字就分三个人_单位百分比10_20_30")
    private String rechargeCommissionRate;

    @Schema(description = "升级购买价格")
    @JTDField(group = "升级配置")
    private BigDecimal upgradePrice;
    @Schema(description = "购买等级佣金百分比")
    private String buyVipCommissionRate;

}
